package com.plants.back.pojo;

import lombok.Data;

import java.util.List;

@Data
public class Vo<T> {
    private String data;
    private String message;
    private boolean flag;
    private List<T> list;
    private T l;
    private Long current;
    private Long total;

    public Vo(boolean flag, List<T> list, Long current, Long total) {
        this.flag = flag;
        this.list = list;
        this.current = current;
        this.total = total;
    }


    public Vo() {
    }

    public Vo(T l) {
        this.l = l;
    }

    public Vo(boolean flag, T l) {
        this.flag = flag;
        this.l = l;
    }

    public Vo(String message, boolean flag, T l) {
        this.message = message;
        this.flag = flag;
        this.l = l;
    }

    public Vo(String message, boolean flag, List<T> list) {
        this.message = message;
        this.flag = flag;
        this.list = list;
    }

    public Vo(List<T> list) {
        this.list = list;
    }

    public Vo(boolean flag, List<T> list) {
        this.flag = flag;
        this.list = list;
    }

    public Vo(String data, boolean flag) {
        this.data = data;
        this.flag = flag;
    }
    public Vo(boolean flag,String message) {
        this.message = message;
        this.flag = flag;
    }

    public Vo(String data, String message, boolean flag) {
        this.data = data;
        this.message = message;
        this.flag = flag;
    }
}
